Bug 555573 – gtk_font_selection_set_font_name
authorChristian Dywan <cdywan@src.gnome.org>
Thu, 9 Oct 2008 16:26:35 +0000 (16:26 +0000)
committerChristian Dywan <cdywan@src.gnome.org>
Thu, 9 Oct 2008 16:26:35 +0000 (16:26 +0000)
shouldn't require a screen

* gtk/gtkfontsel.c (gtk_font_selection_set_font_name):
Don't warn if there is no screen, just return FALSE

svn path=/trunk/; revision=21621

ChangeLog
gtk/gtkfontsel.c

index 8718708bcef668b4302646cb8484ea8cbad63c28..e68b197067027fba20307bd8e2b5d9c92c19a641 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-10-09  Christian Dywan  <christian@imendio.com>
+
+       Bug 555573 – gtk_font_selection_set_font_name
+        shouldn't require a screen
+
+       * gtk/gtkfontsel.c (gtk_font_selection_set_font_name):
+        Don't warn if there is no screen, just return FALSE
+
 2008-10-09  Christian Dywan  <christian@imendio.com>
 
        Bug 555523 – gtk_scale_button_set_adjustment should accept NULL
index c931d2b9d6871868362c890455ffe93ede18e337..d9d4766dbad7be61517396222819d55683cb385b 100644 (file)
@@ -1350,8 +1350,10 @@ gtk_font_selection_set_font_name (GtkFontSelection *fontsel,
   const gchar *new_family_name;
   
   g_return_val_if_fail (GTK_IS_FONT_SELECTION (fontsel), FALSE);
-  g_return_val_if_fail (gtk_widget_has_screen (GTK_WIDGET (fontsel)), FALSE);
-  
+
+  if (!gtk_widget_has_screen (GTK_WIDGET (fontsel)))
+    return FALSE;
+
   new_desc = pango_font_description_from_string (fontname);
   new_family_name = pango_font_description_get_family (new_desc);